aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/[username]/generate/+server.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-12-21 13:40:25 -0800
committerAdam Soltys <[email protected]>2022-12-21 13:40:25 -0800
commitb026bf21ccf70f182c11a7f7542ce0b695e97469 (patch)
tree922e8c623e7399eb157be1f3f5de8c4b513d58f9 /src/routes/(app)/[username]/generate/+server.js
parentca1aff53de569bc1fb07d7fe1d247a33b4c23999 (diff)
downloadcoinos-ui-es.tar.gz
coinos-ui-es.zip
generate keypair for users that don't have onees
Diffstat (limited to 'src/routes/(app)/[username]/generate/+server.js')
-rw-r--r--src/routes/(app)/[username]/generate/+server.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/routes/(app)/[username]/generate/+server.js b/src/routes/(app)/[username]/generate/+server.js
new file mode 100644
index 00000000..c63ab5a6
--- /dev/null
+++ b/src/routes/(app)/[username]/generate/+server.js
@@ -0,0 +1,8 @@
+import { auth, post } from '$lib/utils';
+import { json } from '@sveltejs/kit';
+
+export async function POST({ cookies, request }) {
+ let body = await request.json();
+ let user = await post(`/user`, body, auth(cookies));
+ return json(user);
+}